Optimal. Leaf size=141 \[ -\frac {b \, _2F_1\left (1,\frac {m}{2};\frac {2+m}{2};\frac {b^2 \sec ^2(e+f x)}{a^2+b^2}\right ) (d \sec (e+f x))^m}{\left (a^2+b^2\right ) f m}+\frac {F_1\left (\frac {1}{2};1,1-\frac {m}{2};\frac {3}{2};\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2} \tan (e+f x)}{a f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 141, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3593, 771, 440,
455, 70} \begin {gather*} \frac {\tan (e+f x) \sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m F_1\left (\frac {1}{2};1,1-\frac {m}{2};\frac {3}{2};\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right )}{a f}-\frac {b (d \sec (e+f x))^m \, _2F_1\left (1,\frac {m}{2};\frac {m+2}{2};\frac {b^2 \sec ^2(e+f x)}{a^2+b^2}\right )}{f m \left (a^2+b^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 70
Rule 440
Rule 455
Rule 771
Rule 3593
Rubi steps
\begin {align*} \int \frac {(d \sec (e+f x))^m}{a+b \tan (e+f x)} \, dx &=\frac {\left ((d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2}\right ) \text {Subst}\left (\int \frac {\left (1+\frac {x^2}{b^2}\right )^{-1+\frac {m}{2}}}{a+x} \, dx,x,b \tan (e+f x)\right )}{b f}\\ &=\frac {\left ((d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2}\right ) \text {Subst}\left (\int \left (\frac {a \left (1+\frac {x^2}{b^2}\right )^{-1+\frac {m}{2}}}{a^2-x^2}+\frac {x \left (1+\frac {x^2}{b^2}\right )^{-1+\frac {m}{2}}}{-a^2+x^2}\right ) \, dx,x,b \tan (e+f x)\right )}{b f}\\ &=\frac {\left ((d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2}\right ) \text {Subst}\left (\int \frac {x \left (1+\frac {x^2}{b^2}\right )^{-1+\frac {m}{2}}}{-a^2+x^2} \, dx,x,b \tan (e+f x)\right )}{b f}+\frac {\left (a (d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2}\right ) \text {Subst}\left (\int \frac {\left (1+\frac {x^2}{b^2}\right )^{-1+\frac {m}{2}}}{a^2-x^2} \, dx,x,b \tan (e+f x)\right )}{b f}\\ &=\frac {F_1\left (\frac {1}{2};1,1-\frac {m}{2};\frac {3}{2};\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2} \tan (e+f x)}{a f}+\frac {\left ((d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2}\right ) \text {Subst}\left (\int \frac {\left (1+\frac {x}{b^2}\right )^{-1+\frac {m}{2}}}{-a^2+x} \, dx,x,b^2 \tan ^2(e+f x)\right )}{2 b f}\\ &=-\frac {b \, _2F_1\left (1,\frac {m}{2};\frac {2+m}{2};\frac {b^2 \sec ^2(e+f x)}{a^2+b^2}\right ) (d \sec (e+f x))^m}{\left (a^2+b^2\right ) f m}+\frac {F_1\left (\frac {1}{2};1,1-\frac {m}{2};\frac {3}{2};\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2} \tan (e+f x)}{a f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 14.77, size = 1158, normalized size = 8.21 \begin {gather*} \frac {(d \sec (e+f x))^m \left (b-b \sec ^2(e+f x)^{m/2}+a m \, _2F_1\left (\frac {1}{2},1-\frac {m}{2};\frac {3}{2};-\tan ^2(e+f x)\right ) \tan (e+f x)+b F_1\left (-m;-\frac {m}{2},-\frac {m}{2};1-m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-m/2}\right )}{f (a+b \tan (e+f x)) \left (a m \, _2F_1\left (\frac {1}{2},1-\frac {m}{2};\frac {3}{2};-\tan ^2(e+f x)\right ) \sec ^2(e+f x)-b m \sec ^2(e+f x)^{m/2} \tan (e+f x)+b m F_1\left (-m;-\frac {m}{2},-\frac {m}{2};1-m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{m/2} \tan (e+f x) \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-m/2}+b \sec ^2(e+f x)^{m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-m/2} \left (-\frac {(a-i b) b m^2 F_1\left (1-m;1-\frac {m}{2},-\frac {m}{2};2-m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)}{2 (1-m) (a+b \tan (e+f x))^2}-\frac {(a+i b) b m^2 F_1\left (1-m;-\frac {m}{2},1-\frac {m}{2};2-m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)}{2 (1-m) (a+b \tan (e+f x))^2}\right )-\frac {1}{2} b m F_1\left (-m;-\frac {m}{2},-\frac {m}{2};1-m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-1-\frac {m}{2}} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-m/2} \left (-\frac {b^2 \sec ^2(e+f x) (-i+\tan (e+f x))}{(a+b \tan (e+f x))^2}+\frac {b \sec ^2(e+f x)}{a+b \tan (e+f x)}\right )-\frac {1}{2} b m F_1\left (-m;-\frac {m}{2},-\frac {m}{2};1-m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-1-\frac {m}{2}} \left (-\frac {b^2 \sec ^2(e+f x) (i+\tan (e+f x))}{(a+b \tan (e+f x))^2}+\frac {b \sec ^2(e+f x)}{a+b \tan (e+f x)}\right )+a m \sec ^2(e+f x) \left (-\, _2F_1\left (\frac {1}{2},1-\frac {m}{2};\frac {3}{2};-\tan ^2(e+f x)\right )+\left (1+\tan ^2(e+f x)\right )^{-1+\frac {m}{2}}\right )\right )} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 1.02, size = 0, normalized size = 0.00 \[\int \frac {\left (d \sec \left (f x +e \right )\right )^{m}}{a +b \tan \left (f x +e \right )}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (d \sec {\left (e + f x \right )}\right )^{m}}{a + b \tan {\left (e + f x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^m}{a+b\,\mathrm {tan}\left (e+f\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________